<!--  -->
<template>
    <div class='collectpage'>
     <div class="title">
        <svg @click="goback" width="10.000000" height="16.000000" viewBox="0 0 10 16" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
            <path id="Vector" d="M3.63574 8L10 14.2227L8.18213 16L0 8L8.18213 0L10 1.77734L3.63574 8Z" fill-rule="evenodd" fill="#06070D"/>
        </svg>
        <div class="titleitem">
       <h3>我的申请</h3>
       <svg @click="addBook" t="1703470711765" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5241" width="30" height="30"><path d="M801.171 483.589H544V226.418c0-17.673-14.327-32-32-32s-32 14.327-32 32v257.171H222.83c-17.673 0-32 14.327-32 32s14.327 32 32 32H480v257.17c0 17.673 14.327 32 32 32s32-14.327 32-32v-257.17h257.171c17.673 0 32-14.327 32-32s-14.327-32-32-32z" fill="" p-id="5242"></path></svg>
        </div>
    </div>
    <h3 class="sher">审核与通过列表</h3>
    <van-row type="flex" justify="center">
        <van-col span="22" v-for="(item, index) in allCollectList" :key="index" class="alitem">
        <div class="iteminfo">
            <p>书名：{{ item.req_book }}</p>
            <p class="author">作者：{{ item.req_author }}</p>
        </div>
        <div>
            <svg t="1703490950590" v-if="!item.status" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4428" width="30" height="30"><path d="M342.4 626.8c-1.7 0-3.2-1.1-3.8-2.7-12.3-36.7-14.6-72.4-6.9-106.3 6.3-27.8 19.5-54.6 39.1-79.6 34.5-43.9 79.8-70.4 94.7-79.2l0.5-0.3c1-0.6 2-1.1 2.9-1.6 1.7-0.9 3.2-1.8 4.7-2.8 2.7-1.8 5.4-3.6 8.3-5.4 18.4-11.8 41.3-26.5 72-70 21.1-30 25.5-60.4 12.4-85.8-11.2-21.6-34.6-36.1-58.1-36.1-33.7 0-51.1 16.7-59.6 30.7-14.6 23.8-14.7 57.4-0.3 85.7 0.9 1.7 0.4 3.8-1.1 5-0.7 0.5-1.6 0.8-2.4 0.8-1 0-2-0.4-2.7-1-32-29.1-34.1-58.6-30.2-78.3 6.6-33.3 35.8-63 59-71.5 3.9-1.4 18.2-6.1 37.6-6.1 18.8 0 35.6 4.3 50 12.7 18.4 10.8 32.2 28.2 40.9 51.7 13.8 37.1 4.8 76.8-26.8 118.1-27 35.4-63.6 58.8-77.3 67.6-1 0.6-1.8 1.2-2.5 1.6-1.3 0.9-3.6 2.2-6 3.5-2.1 1.2-4.2 2.4-5.6 3.3-40 25.1-133.6 84-134.8 241.8 0 2-1.4 3.6-3.4 3.9-0.2 0.3-0.4 0.3-0.6 0.3z" fill="" p-id="4429"></path><path d="M342.4 624.8c-0.8 0-1.6-0.5-1.9-1.4-12.2-36.3-14.5-71.7-6.8-105.2 6.3-27.5 19.3-54.1 38.8-78.8 34.3-43.6 79.3-70 94.1-78.7l0.5-0.3c2.6-1.6 5.3-2.9 7.7-4.5 19.8-13.4 45.2-25.4 80.8-75.9 22-31.1 25.8-62.3 12.5-87.8-11.5-22.2-35.6-37.2-59.9-37.2-34.7 0-52.5 17.2-61.3 31.6-14.9 24.4-15.1 58.8-0.4 87.7 0.4 0.9 0.2 1.9-0.6 2.5-0.4 0.3-0.8 0.4-1.2 0.4-0.5 0-1-0.2-1.3-0.5-31.3-28.5-33.3-57.3-29.5-76.4 6.5-32.6 35-61.7 57.7-70 3.8-1.4 17.9-5.9 37-5.9 18.4 0 34.9 4.2 49 12.5 18 10.6 31.5 27.6 40.1 50.7 13.5 36.4 4.6 75.5-26.5 116.2-28.7 37.5-68.3 61.5-79.4 68.8-2.5 1.6-8.6 5-11.6 6.9-45.1 28.3-134.5 88.1-135.8 243.5 0 1-0.7 1.8-1.7 2-0.1-0.2-0.2-0.2-0.3-0.2zM686.3 621.2h-0.4c-22.2-4.1-31.1-20.9-30.8-57.9 0.3-39.6-11.4-72-34.7-96.2-18.5-19.2-41.1-28.9-56-32.3-24.3-5.7-27.7-21-26.3-35.2 0.8-8.1 5.7-13.3 11.3-13.3 12.1 0 14 8.3 15.2 15.3 0.9 5.5 3.7 7.3 6.2 8.3 3 1.2 6.9 2.7 12.1 4 6.2 1.5 12 3.1 20.9 7.4 36.2 17.7 66.4 40.4 70.5 140 1.3 32.1 5.5 50.1 13.2 56.6 0.7 0.6 0.9 1.6 0.5 2.4-0.2 0.5-1 0.9-1.7 0.9zM448.3 714.8c-16.9 0-30.8-3-41.2-8.9-18-10.1-28.5-20.9-31.4-31.9-1.8-7.1-0.5-14.4 4-21.6 6.7-10.8 18.9-17 33.5-17 7.8 0 15.9 1.7 24 5.2 6.3 2.7 14.1 4 23.4 4 20.1 0 40.1-6.4 40.3-6.5 0.2-0.1 0.4-0.1 0.6-0.1 0.6 0 1.2 0.3 1.6 0.8 0.5 0.7 0.5 1.7 0 2.4-13.3 17.6-29 26.6-46.5 26.6-6.7 0-13.9-1.3-21.2-3.9-8.5-3-15.8-4.6-21.6-4.6-8.4 0-13.9 3.2-16.6 9.9-1.7 4.2-1.5 8.8 0.5 11.8 1.8 2.7 5 4.1 9.4 4.1 2.9 0 6.2-0.6 10-1.8 4.2-1.3 8.4-2 12.6-2 11.9 0 21.8 5.5 29.7 9.9 2 1.1 3.9 2.2 5.7 3.1 4.7 2.3 8.9 3.4 13.2 3.4 4.4 0 9.1-1 16.3-3.6 2-0.7 3.7-1 5.4-1 3 0 5.3 1.1 7.4 2.2 2.4 1.2 4.9 2.4 9 2.4h1.3c0.9 0 1.8 0.7 2 1.6 0.2 1-0.3 1.9-1.2 2.3-17.2 6.3-44.6 13.2-70.2 13.2z" fill="" p-id="4430"></path><path d="M504.7 740.4c-6.3 0-11.3-1-14.9-3-1.3-0.7-1.9-2.2-1.5-3.7 0.4-1.5 1.7-2.4 3.2-2.4h0.6c14.4 0 30.5-6.1 39.1-14.8 11.4-11.6 20.8-19.8 37.4-20.6 11.6-0.5 32.7-10.6 39.9-21.2 2.3-3.3 2.9-6.4 2-9.1-0.6-1.6-1.8-3.1-6.6-3.1-4 0-9.5 1-16.5 2.3l-1.8 0.3c-3.6 0.6-10.8 1.7-19.3 1.7-17.7 0-40.1-4.6-45.9-26.5-0.2-0.8 0.1-1.7 0.8-2.2 0.3-0.2 0.7-0.3 1.1-0.3 0.5 0 0.9 0.2 1.3 0.5 0.1 0.1 8.1 6.3 24.3 6.3 5.6 0 11.6-0.7 17.9-2.2 11.4-2.7 21.6-4 30.3-4 23.6 0 31.9 9.8 34.7 18.1 3.7 11 2.5 22.4-3.6 33.1-7.3 12.9-20 21.8-28.2 23.6-5.9 1.3-10.7 1.7-15 2-7.8 0.6-13.4 1-20.6 7.2-9 7.9-39.1 18-58.7 18zM327.7 822.1c-45.2 0-108.2-6.5-151.3-37.2-31.2-22.2-45.8-42.9-43.6-61.5 2.5-20.9 25.3-34.1 44-41.5 22.2-8.8 70.5-13.4 106.7-13.4 20.1 0 35.7 1.4 43.8 3.9 0.9 0.3 1.5 1.1 1.4 2.1s-0.8 1.7-1.7 1.8c-128.6 16.3-147.6 37.7-149.3 56.4-0.3 3.6 1.9 8 6.3 13 18.9 20.8 82.6 52.1 180.7 53.1h1.9c38.9 0 109.2-10.2 122.2-16.5 10.8-4.9 27-11.5 42.9-11.5 6.4 0 12.2 1.1 17.4 3.2 0.8 0.3 1.3 1.2 1.2 2.1-0.1 0.9-0.8 1.6-1.7 1.7-22.4 3.1-46.3 10-73 21.1-27.6 11.5-87.4 23.2-147.9 23.2zM480.8 841.6c-0.6 0-1.3-0.3-1.7-0.9-0.6-0.8-0.4-1.9 0.3-2.6 34.6-32.2 63-36.6 88.6-36.6 10.9 0 22.4 0.9 34.5 1.9 9.4 0.7 19 1.5 29.5 2 3.3 0.1 6.8 0.2 10.5 0.2 31.6 0 83.2-5.5 127.2-17.8 48.6-13.5 76-32 77-51.8 0.3-6.4-2-12.2-7.1-17.6-33.2-35-165.4-35.4-171-35.4-0.8 0-1.6-0.5-1.9-1.3-0.3-0.8-0.1-1.6 0.5-2.2 9.6-8.7 45.7-9.7 60.8-9.7 37 0 91.8 5.3 124.9 20.3 24.3 11 39.1 29.3 38.6 47.7-0.4 14.7-10.4 35.8-55.7 53.5-61.7 24-111.5 29.7-167.2 30.7-4.5 0.1-9.1 0.1-13.7 0.1-36.6 0-69.2-2.7-90.8-4.4-10.5-0.9-18.1-1.5-22.2-1.5h-1.3c-13.1 0.6-25.8 7.5-40.5 15.5-5.9 3.2-12 6.5-18.5 9.6-0.3 0.2-0.6 0.3-0.8 0.3z" fill="" p-id="4431"></path></svg>
            <svg t="1703490992033" v-else class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5458" width="30" height="30"><path d="M852.8 261.6l2.3 1.2-2.3-1.2z" fill="#68BB8D" p-id="5459"></path><path d="M514.2 99.9c-228.5 0-413.7 185.2-413.7 413.7s185.2 413.7 413.7 413.7S927.8 742 927.8 513.5 742.5 99.9 514.2 99.9zM712 430.7L553 587l-77 75.3c-0.3 0.4-0.7 0.8-1.2 1.3-0.6 0.6-1.3 1.2-2 1.8-4.8 4.6-11.1 7.1-17.8 7.1h-1.1c-7 0-13.5-2.6-18.3-7.4-0.7-0.6-1.3-1.2-1.9-1.7-0.4-0.4-0.7-0.7-1-1.1L304.3 533.9c-10.4-10.4-9.7-28 1.5-39.2 5.7-5.7 13.3-8.9 21-8.9 7 0 13.5 2.6 18.3 7.4l109.4 109.4 58.1-56.8 159.1-156.3c4.8-4.7 11.2-7.2 18.1-7.2 7.8 0 15.5 3.3 21.2 9.1 11 11.4 11.6 29 1 39.3z" fill="#68BB8D" p-id="5460"></path></svg>
        </div>
        </van-col>
    </van-row>
    </div>
 </template>

<script>
// 这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
// 例如：import 《组件名称》 from '《组件路径》';
import { getReqBook } from '@/api/api.js'
export default {
  // import引入的组件需要注入到对象中才能使用
  components: {},
  data () {
    // 这里存放数据
    return {
      value: '',
      allCollectList: [],
      page: 1,
      pageSize: 30,
      // 是否处在加载状态
      loading: false,
      // 是否已加载完成
      finished: false,
      // 是否加载失败
      error: false,
      // 数据总条数
      total: 0
    }
  },
  // 监听属性 类似于data概念
  computed: {},
  // 监控data中的数据变化
  watch: {},
  // 方法集合
  methods: {
    addBook () {
      this.$router.push('/addbook')
    },
    goback () {
      this.$router.push('/user')
    },
    async getAllBook () {
      await getReqBook().then((res) => {
        if (res.code === 200) {
          this.allCollectList = res.data.list
        } else {
          this.error = true
        }
      })
    },
    async goBookSearch () {
    }
  },
  // 生命周期 - 创建完成（可以访问当前this实例）
  created () {

  },
  // 生命周期 - 挂载完成（可以访问DOM元素）
  mounted () {
    this.getAllBook()
  }
}
</script>
 <style lang='less' scoped>
 .titleitem{
    display: flex;
    align-items: center;
 }
 .collectpage{
   width: 100%;
   height: 100%;
   .title{
     margin-left: 20px;
     display: flex;
     align-items: center;
     justify-content: space-between;
     height: 60px;
     text-align: left;
     padding-right: 20px;
     line-height: 60px;
     border-bottom: 1px solid #eee;
     h3{
       margin-left: 10px;
     }
   }
 }
 .sher{
    margin: 10px;
    text-align: center;
 }
 .alitem {
    margin: 10px 0px;
    padding: 0px 20px;
   height: 50px;
   text-align: center;
   position: relative;
   display: flex;
   justify-content: space-between;
   align-items: center;
   background-color: white;
//    border: 1px solid black;
   border-radius: 15px;
   box-shadow: 0px 0px 6px 0px #eee;
   .iteminfo{
    text-align: left;
    .author{
        color: #414141;
    }
   }
   p{
     font-size: 13px;
     white-space: nowrap;
     text-overflow: ellipsis;
     overflow: hidden;
   }
   .svgicon{
     width: 25px;
     height: 25px;
     background: #ffffff;
     border-radius: 50%;
     position: absolute;
     right: 16%;
     bottom: 80px;
     display: flex;
     align-items: center;
     justify-content: center;
   }
 }
 </style>
